#include "ssmt.h"

#ifndef LINEARALLOCATOR_H
#define LINEARALLOCATOR_H

namespace ssmt
{
	namespace allocator
	{
		class LinearAllocator
		{
		public:
			LinearAllocator(void* start, void* end);
			void* allocate(size_t size, size_t alignment, size_t offset);
			void deallocate(void* ptr);
			void reset();

			size_t getAllocationSize(void* ptr);
		private:
			char* _start;
			char* _end;
			char* _current;
		};
	} //namespace allocator
} //namespace ssmt

#endif LINEARALLOCATOR_H